package test.multthread;

/**
 * Created by IntelliJ IDEA.
 * User: luotao
 * Date: 12-5-29
 * Time: 15:51
 */
public class AddThread extends Thread{
    Globol g;
    public AddThread(Globol globol) {
        this.g=globol;
    }

    @Override
    public void run() {
        for(int i=0;i<10;i++){
            g.count++;
            try {
            sleep(150);
        } catch (InterruptedException e) {
            e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
        }
        }
    }
}
